package cn.com.websocket.po;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.UUID;

/***
 ** @category 请用一句话描述这个类的用途
 ** @author qing.yunhui
 ** @email: qingyh@glodon.com
 ** @createTime: 2021-08-18 11:23
 **/
@Getter
@Setter
public class MessageFile  implements Serializable {

    /**
     * <p>主键id</p>
     * */
    private String id;

    /**
     * <p>消息id</p>
     * */
    private String messageId;

    /**
     * <p>附件或语音消息base64码</p>
     * */
    private String data;

    /**
     * <p>文件名</p>
     * */
    private String fileName;

    /**文件类型*/
    private String fileType;

    /**文件大小*/
    private Long fileSize;

    /**
     * <p>base64前缀</p>
     * */
    private String base64Prefix;

    /**
     * <p>创建时间</p>
     * */
    @JSONField(format="yyyy-MM-dd HH:mm:ss SSS")
    private String createTime;

    public MessageFile(){}

    public MessageFile(String messageId, String data, String fileName, String base64Prefix) {
        this.id= UUID.randomUUID().toString();
        this.messageId = messageId;
        this.data = data;
        this.fileName = fileName;
        this.base64Prefix = base64Prefix;
    }
}
